import { MockMethod } from 'vite-plugin-mock';
import { resultPageSuccess } from '../_util'
export default [
  {
    url: '/mock-api/realtime/env',
    method: 'get',
    timeout: 800,
    response: ({ query }) => {
      let res = {
        data: new Array(102).fill({
          'id|+1': 1,
          city: '@city',
          county: '@county',
          org: '单位1',
          lab: '实验室1',
          name: 'name',
          dataType: 'dtype',
          data: 'sad',
          freshTime: '@date'
        })
      }
      return resultPageSuccess(1,10,res.data)
    }
  },
  {
    url: '/mock-api/realtime/entrance',
    method: 'get',
    timeout: 800,
    response: ({ query }) => {
      let res = {
        data: new Array(24).fill({
          'id|+1': 1,
          city: '@city',
          county: '@county',
          org: '单位1',
          lab: '实验室1',
          name: 'name',
          freshTime: '@date',
          direction: '外出',
          username: '@cname',
          'userNo|+1': 1,
          img: 'img'
        })
      }
      return resultPageSuccess(1,10,res.data)
    }
  },
  {
    url: '/mock-api/realtime/video',
    method: 'get',
    timeout: 800,
    response: ({ query }) => {
      let res = {
        data: new Array(33).fill({
          'id|+1': 1,
          city: '@city',
          county: '@county',
          org: '单位1',
          lab: '实验室1',
          name: 'name',
          freshTime: '@date',
          behaviorInfo: '未佩戴口罩',
          img: 'img'
        })
      }
      return resultPageSuccess(1,10,res.data)
    }
  },
  {
    url: '/mock-api/realtime/transport',
    method: 'get',
    timeout: 800,
    response: ({ query }) => {
      let res = {
        data: new Array(12).fill({
          'id|+1': 1,
          city: '@city',
          county: '@county',
          org: '单位1',
          lab: '实验室1',
          transportBoxId: 'boxId',
          temperature: 'boxId',
          freshTime: '@date'
        })
      }
      return resultPageSuccess(1,10,res.data)
    }
  },
  
] as MockMethod[];
